package com.study.lxy.springcloud.uclient.controller;

import com.study.lxy.springcloud.common.format.ServiceResp;
import com.study.lxy.springcloud.uclient.entity.ClientUser;
import com.study.lxy.springcloud.uclient.service.NewRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class UserRegisterController {
    @Autowired
    private NewRegisterService newRegisterService;
    @RequestMapping(value = "/register",method = RequestMethod.POST)
    public ServiceResp newRegister(@ModelAttribute ClientUser user){
        newRegisterService.newRegister(user);
        return ServiceResp.dummyResp();
    }
    @GetMapping("/gatewayTest")
    public ServiceResp gatewayTest(){
        return ServiceResp.buildResult("gateWaySuccess");
    }
}
